/* eslint-disable */
// @ts-ignore
import { queryOptions, useMutation } from '@tanstack/vue-query';
import type { DefaultError } from '@tanstack/vue-query';
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as apis from './weixinyonghujingdian';
import * as API from './types';

/** 获取评论 GET /tourism/client/c/spot/getcomment */
export function getCommentUsingGetQueryOptions(options: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.getCommentUsingGETParams;
  options?: CustomRequestOptions;
}) {
  return queryOptions({
    queryFn: async ({ queryKey }) => {
      return apis.getCommentUsingGet(queryKey[1] as typeof options);
    },
    queryKey: ['getCommentUsingGet', options],
  });
}

/** 根据地理位置 GET /tourism/client/c/spot/getgeospot */
export function getGeoSpotUsingGetQueryOptions(options: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.getGeoSpotUsingGETParams;
  options?: CustomRequestOptions;
}) {
  return queryOptions({
    queryFn: async ({ queryKey }) => {
      return apis.getGeoSpotUsingGet(queryKey[1] as typeof options);
    },
    queryKey: ['getGeoSpotUsingGet', options],
  });
}

/** 获取历史动态 GET /tourism/client/c/spot/getspotheritage */
export function getSpotHeritageUsingGetQueryOptions(options: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.getSpotHeritageUsingGETParams;
  options?: CustomRequestOptions;
}) {
  return queryOptions({
    queryFn: async ({ queryKey }) => {
      return apis.getSpotHeritageUsingGet(queryKey[1] as typeof options);
    },
    queryKey: ['getSpotHeritageUsingGet', options],
  });
}

/** 获取景点信息 GET /tourism/client/c/spot/getspotinfo */
export function getSpotInfoUsingGetQueryOptions(options: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.getSpotInfoUsingGETParams;
  options?: CustomRequestOptions;
}) {
  return queryOptions({
    queryFn: async ({ queryKey }) => {
      return apis.getSpotInfoUsingGet(queryKey[1] as typeof options);
    },
    queryKey: ['getSpotInfoUsingGet', options],
  });
}

/** 获取门票 GET /tourism/client/c/spot/getticket */
export function getTicketUsingGetQueryOptions(options: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.getTicketUsingGETParams;
  options?: CustomRequestOptions;
}) {
  return queryOptions({
    queryFn: async ({ queryKey }) => {
      return apis.getTicketUsingGet(queryKey[1] as typeof options);
    },
    queryKey: ['getTicketUsingGet', options],
  });
}

/** 获取景点 GET /tourism/client/c/spot/page */
export function pageUsingGet2QueryOptions(options: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.pageUsingGET2Params;
  options?: CustomRequestOptions;
}) {
  return queryOptions({
    queryFn: async ({ queryKey }) => {
      return apis.pageUsingGet2(queryKey[1] as typeof options);
    },
    queryKey: ['pageUsingGet2', options],
  });
}
